Skip to content

Warn when covariance matrix isWarn when covariance matrix is PSD but ill-conditionedPSD but ill-conditioned#695

Closed
nxd914 wants to merge 1 commit intoPyPortfolio:mainfrom
nxd914:warn-ill-conditioned-cov
Closed

Warn when covariance matrix isWarn when covariance matrix is PSD but ill-conditionedPSD but ill-conditioned#695
nxd914 wants to merge 1 commit intoPyPortfolio:mainfrom
nxd914:warn-ill-conditioned-cov

Conversation

@nxd914
Copy link

@nxd914 nxd914 commented Dec 28, 2025

This PR adds a RuntimeWarning when a covariance matrix is positive semidefinite
but numerically ill-conditioned, suggesting the use of shrinkage estimators
(Ledoit-Wolf or OAS) for improved numerical stability.

No API or behavioral changes are introduced. A unit test is included.

@nxd914 nxd914 closed this by deleting the head repository Jan 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant